{template Public:Page:header}
<div class="container">
  <div class="row"> 
  {template Member:Index:sidebar}
    <div class="col-lg-10 well-col-pl-30">
      <div class="row">
        <div class="well">
          <h3>收货地址</h3>
          {if $countdata<3}
				<div class="alert alert-warning fade in">
                    <button data-dismiss="alert" class="close">
                        ×
                    </button>
                    <i class="fa-fw fa fa-info-circle"></i>
                        <strong>提示</strong> 收货地址最多只能添加3条.
				</div>
          {/if}
          
          
          <table class="table table-striped table-bordered table-hover">
                <thead>
                    <tr>
                        <th>
                        	 <i class="fa fa-user"></i> 收货姓名
                        </th>
                        <th class="hidden-xs">
                           
                            <i class="fa fa-phone"></i> 联系电话
                        </th>
                        <th>
                            <i class="fa fa-home"></i> 收货地址
                        </th>
                         <th>
                         <i class="fa fa-dot-circle-o"></i> 收货默认
                        </th>
                        <th>
                        </th>
                    </tr>
                </thead>
                <tbody>
                
                	{if !empty($list)}
                        {foreach $list $data}
                            <tr>
                                <td>
                                   {echo $data['receivename']}
                                </td>
                                <td>
                                   {echo $data['phone']}
                                </td>
                                <td>
                                    {echo $data['address']}
                                </td>
                                <td>
                                    {if $data['isuse']==1}<i class="glyphicon glyphicon-ok"></i>{/if}
                                </td>
                                <td>
                                    <a class="btn btn-default btn-xs black" href="{echo U('/member/billaddress/edit/id/'.$data['id'])}"><i class="fa fa-edit"></i> 修改</a>  <a class="btn btn-default btn-xs black" href="javascript:void(0)" onclick="Confirm('{echo $data['id']}','ID{echo $data['id']}','{echo U('/post/billaddress/delete')}')"><i class="fa fa-trash-o"></i> 删除</a>
                                </td>
                            </tr>
                        {/foreach}
                    {/if}
                    
                </tbody>
            </table>

          {if $countdata<3}
          	  <br>
              <h5>添加收货地址</h5>
    		  <hr />
              {template Member:Billaddress:form}
       	  {/if}

          </div>
      </div>
    </div>
  </div>
</div>
     
{template Public:Page:footer}